<template>
  <div id="app">
    <HelloWorld
        type="text"
        style="width: 200px;"
        prefix-icon="t-icon-lock"
        placeholder="请选择日期"
        @input="inputFn($event)"
        v-model="value"
    />

    <input type="text" placeholder="请选择日期">
    {{ value }}

  </div>
</template>

<script>
import HelloWorld from './components/input'

export default {
  provide: {
    dragEventFn: function (flag) {
        console.log(flag)
    }
  },
  name: 'App',
  components: {
    HelloWorld
  },
  methods: {
    getT() {
      return !!this.value
    },
    inputFn(event) {
      console.log(event)
      console.log(typeof event)
      // console.log(event.target.value)
    },
  },
  data() {
    return {
      value: ''
    }
  },
  mounted() {
    setTimeout(() => {
      this.value = '2022-02-10'
    }, 1000)
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
